package com.mjlf.test_shiro.entity;

import org.springframework.beans.factory.annotation.Autowired;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @ClassName: Person
 * @Author: majun
 * @CreateDate: 2018/10/17 16:14
 * @Version: 1.0
 * @Description: TODO
 */

public class Person implements Serializable {

    @NotNull(message = "用户id不能为空")
    private String id;

    @NotNull(message = "用户名称不能为空")
    private String name;

    @NotNull(message = "用户密码")
    private String password;

    private Integer age;

    private String address;

    public Person() {
    }

    public Person(@NotNull(message = "用户id不能为空") String id,
                  @NotNull(message = "用户名称不能为空") String name,
                  @NotNull(message = "用户密码") String password) {
        this.id = id;
        this.name = name;
        this.password = password;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", age=" + age +
                ", address='" + address + '\'' +
                '}';
    }
}
